home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / exitwi4r / frmmain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-07-12  |  5.7 KB  |  193 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
  3. Begin VB.MDIForm MDIForm1 
  4.    BackColor       =   &H8000000C&
  5.    Caption         =   "Sample programing language v 1 (by mostafa mohamed)"
  6.    ClientHeight    =   4920
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   7980
  10.    LinkTopic       =   "MDIForm1"
  11.    StartUpPosition =   3  'Windows Default
  12.    WindowState     =   2  'Maximized
  13.    Begin MSComDlg.CommonDialog cdlg 
  14.       Left            =   240
  15.       Top             =   1080
  16.       _ExtentX        =   847
  17.       _ExtentY        =   847
  18.       _Version        =   327681
  19.       CancelError     =   -1  'True
  20.    End
  21.    Begin VB.PictureBox Picture3 
  22.       Align           =   2  'Align Bottom
  23.       BackColor       =   &H00800000&
  24.       BorderStyle     =   0  'None
  25.       Height          =   225
  26.       Left            =   0
  27.       ScaleHeight     =   225
  28.       ScaleWidth      =   7980
  29.       TabIndex        =   7
  30.       Top             =   2880
  31.       Width           =   7980
  32.       Begin VB.CommandButton Command6 
  33.          Caption         =   "x"
  34.          Height          =   255
  35.          Left            =   0
  36.          TabIndex        =   9
  37.          Top             =   0
  38.          Width           =   255
  39.       End
  40.       Begin VB.Label Label1 
  41.          BackStyle       =   0  'Transparent
  42.          Caption         =   "Debug Window"
  43.          ForeColor       =   &H00FFFFFF&
  44.          Height          =   255
  45.          Left            =   360
  46.          TabIndex        =   8
  47.          Top             =   0
  48.          Width           =   1215
  49.       End
  50.    End
  51.    Begin VB.PictureBox Picture2 
  52.       Align           =   2  'Align Bottom
  53.       BackColor       =   &H00FFFFFF&
  54.       Height          =   1815
  55.       Left            =   0
  56.       ScaleHeight     =   1755
  57.       ScaleWidth      =   7920
  58.       TabIndex        =   6
  59.       Top             =   3105
  60.       Width           =   7980
  61.    End
  62.    Begin VB.PictureBox Picture1 
  63.       Align           =   1  'Align Top
  64.       BorderStyle     =   0  'None
  65.       Height          =   375
  66.       Left            =   0
  67.       ScaleHeight     =   375
  68.       ScaleWidth      =   7980
  69.       TabIndex        =   0
  70.       Top             =   0
  71.       Width           =   7980
  72.       Begin VB.CommandButton Command7 
  73.          Caption         =   "DEBUG WINDOW"
  74.          Height          =   375
  75.          Left            =   3960
  76.          TabIndex        =   10
  77.          Top             =   0
  78.          Width           =   1695
  79.       End
  80.       Begin VB.CommandButton Command5 
  81.          Caption         =   "STOP"
  82.          Enabled         =   0   'False
  83.          Height          =   375
  84.          Left            =   3120
  85.          TabIndex        =   5
  86.          Top             =   0
  87.          Width           =   615
  88.       End
  89.       Begin VB.CommandButton Command4 
  90.          Caption         =   "RUN"
  91.          Height          =   375
  92.          Left            =   2520
  93.          TabIndex        =   4
  94.          Top             =   0
  95.          Width           =   615
  96.       End
  97.       Begin VB.CommandButton Command3 
  98.          Caption         =   "SAVE"
  99.          Height          =   375
  100.          Left            =   1560
  101.          TabIndex        =   3
  102.          Top             =   0
  103.          Width           =   735
  104.       End
  105.       Begin VB.CommandButton Command2 
  106.          Caption         =   "OPEN"
  107.          Height          =   375
  108.          Left            =   840
  109.          TabIndex        =   2
  110.          Top             =   0
  111.          Width           =   735
  112.       End
  113.       Begin VB.CommandButton Command1 
  114.          Caption         =   "NEW"
  115.          Height          =   375
  116.          Left            =   120
  117.          TabIndex        =   1
  118.          Top             =   0
  119.          Width           =   735
  120.       End
  121.    End
  122. Attribute VB_Name = "MDIForm1"
  123. Attribute VB_GlobalNameSpace = False
  124. Attribute VB_Creatable = False
  125. Attribute VB_PredeclaredId = True
  126. Attribute VB_Exposed = False
  127. 'This programe is by mostafa mohamed
  128. 'it is about a very sample progaming
  129. 'program that contain a very simple debuger
  130. 'and it not help you only to start make a
  131. 'debuger but you can use it for saving files
  132. 'in your format saving objects on the form
  133. 'and load the file and set the debuger to
  134. 'load objects.
  135. 'Note: you can use its code in any project
  136. 'Email
  137. 'mmhafez@geganet.net
  138. 'mostafahafez81@hotmail.com
  139. 'website
  140. 'http://www.geocities.com/ResearchTriangle/Campus/4598/Vb.HTML
  141. Private Sub Command1_Click()
  142. On Error Resume Next
  143. 'New document (Erase all text on the text box)
  144. Form1.RichTextBox1.Text = ""
  145. End Sub
  146. Private Sub Command2_Click()
  147. On Error GoTo errr
  148. cdlg.Filter = "Sample prog. files (*.spf)|*.spl|All files (*.*)|*.|"
  149. cdlg.ShowOpen
  150. Form1.RichTextBox1.LoadFile cdlg.filename
  151. Exit Sub
  152. errr:
  153. Resume Next
  154. End Sub
  155. Private Sub Command3_Click()
  156. On Error GoTo errr
  157. cdlg.Filter = "Sample prog. files (*.spf)|*.spl|"
  158. cdlg.ShowSave
  159. Form1.RichTextBox1.SaveFile cdlg.filename, 1
  160. Exit Sub
  161. errr:
  162. Resume Next
  163. End Sub
  164. Private Sub Command4_Click()
  165. On Error Resume Next
  166. Dim linedata As String
  167. Dim cmnd As String
  168. Dim cval As String
  169. Form1.RichTextBox1.SaveFile App.Path & "\temp.tmp", 1
  170. Form2.Show
  171. Open App.Path & "\temp.tmp" For Input As #1
  172. Input #1, linedata
  173. cmnd = getcommand(linedata)
  174. cval = getval(linedata)
  175. docommand cmnd, cval
  176. Loop Until EOF(1)
  177. Close #1
  178. Form1.Enabled = False
  179. Command4.Enabled = False
  180. Command5.Enabled = True
  181. End Sub
  182. Private Sub Command5_Click()
  183. Unload Form2
  184. End Sub
  185. Private Sub Command6_Click()
  186. Picture2.Visible = False
  187. Picture3.Visible = False
  188. End Sub
  189. Private Sub Command7_Click()
  190. Picture3.Visible = True
  191. Picture2.Visible = True
  192. End Sub
  193.